package com.campus.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

@TableName(value = "t_sys_user_role", schema = "campus")
public class UserRole implements Serializable {

    @TableId
    private Long userId;  // 用户ID
    @TableId
    private Long roleId;  // 角色ID

    @TableField(exist = false)
    private User user;    // 关联用户
    @TableField(exist = false)
    private Role role;    // 关联角色

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }
}
